package com.yl.chainStore.mapper.pay

import com.yl.chainStore.entity.pay.PayCustomerBalanceInLog;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yl.chainStore.pojo.dto.statistical.PaySumMoneyForDayDto
import com.yl.chainStore.pojo.dto.statistical.StatisticalBalanceInLogDto
import com.yl.chainStore.pojo.dto.statistical.StatisticalBalanceInLogByDayDto
import com.yl.chainStore.pojo.dto.statistical.StatisticalBalanceInLogByTypeDto
import com.yl.chainStore.pojo.vo.statistical.IncomeSummarySelectVo
import com.yl.chainStore.pojo.vo.statistical.ReconciliationSelectVo
import org.apache.ibatis.annotations.Mapper
import org.apache.ibatis.annotations.Param

/**
 * <p>
 * 用户充值记录表 Mapper 接口
 * </p>
 *
 * @author cxw
 * @since 2021-07-30
 */
@Mapper
interface PayCustomerBalanceInLogMapper : BaseMapper<PayCustomerBalanceInLog> {

	/**
	 * 按日期统计充值记录
	 */
	fun getCustomerBalanceInLogByDay(@Param("vo") vo: IncomeSummarySelectVo): List<StatisticalBalanceInLogByDayDto>

	/**
	 * 按付款类型统计
	 */
	fun getCustomerBalanceInLogByPayType(@Param("vo") vo: IncomeSummarySelectVo): List<StatisticalBalanceInLogByTypeDto>

	/**
	 * 充值总额
	 */
	fun getTopUpSumMoney(@Param("vo")vo: ReconciliationSelectVo): Long

	/**
	 * 每日充值总额
	 */
	fun getOnlyTopUpBalanceSumMoneyByDay(@Param("vo")vo: ReconciliationSelectVo): List<PaySumMoneyForDayDto>
}
